package com.mail.dubbo.mapper;

import com.mail.model.db.UmsRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 后台用户角色表 Mapper 接口
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
public interface UmsRoleMapper extends BaseMapper<UmsRole> {

	/**
	 * 获取所有角色信息
	 * @return
	 */
	@Select("select * from mall.ums_role where status = 1")
	List<UmsRole> selectAll();

	/**
	 * 根据id修改角色状态
	 * @param id
	 * @param status
	 */
	@Update("update mall.ums_role set status = #{status} where id = #{id};")
	void updateStatus(@Param("id") Long id,@Param("status") Long status);
}
